import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
import './index.less';
/**
 * 具有星期提示信息和前缀信息的基础日期选择器
 * @example ../../../doc/basicDatepicker.md
 */
export default class Button extends React.Component {
  render() {
    const { prefixTxt, width, week, onChange } = this.props;
    console.log(this.props);
    return (
      <span className="basic-container">
        <span className="prefix-text">{prefixTxt}</span>
        <span className="suffix-text">{week}</span>
      </span>
    );
  }
}

Button.displayName = 'Button 日期选择框';

Button.propTypes = {
  /** input width */
  width: PropTypes.string,
  /** datePicker prefix info */
  prefixTxt: PropTypes.string.isRequired,
  /** show week info when select certain date */
  week: PropTypes.string.isRequired,
  /** function call on select certain date */
  onChange: PropTypes.func.isRequired,
}

Button.defaultProps = {
  width: '250px',
}
